package com.blazer.a;

import java.util.Scanner;

public class Scannerdemo {
    public static void main(String[] args) {
        //scammer是java定义好的一个类，数据通过键盘录入的形式放到代码中运行
        //创建scanner对象
        Scanner scanner=new Scanner(System.in);

        //调用方法，实现键盘录入
        int data1=scanner.nextInt();
        System.out.println("data"+data1);
        String data2=scanner.next();
        System.out.println("data1"+data2);
        String line=scanner.nextLine();
        System.out.println("line1"+line);
        int year1=scanner.nextInt();
        int year2=scanner.nextInt();
        int year3=scanner.nextInt();
        String resultyear=year1>year2 ? (year1>year3 ? "最大年龄"+year1: "最大年龄"+year3 ) :(year2>year3?"最大年龄"+year2: "最大年龄"+year3);
        System.out.println("result"+resultyear);

    }

}
